package cn.gcjxsc.consts;

/**
 * 错误类型
 * @author pumbaa
 * @since 1.0
 */
public enum ErrorType {
    OTHER(0, "其他类型"),
    SALESMAN_SHOPPING_INCOME(1, "业务员推荐购物收益");
    private int type;
    private String desc;

    ErrorType(int type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public int getType() {
        return type;
    }

    public String getDesc() {
        return desc;
    }

    public static ErrorType fromCode(int type) {
        if (type ==1 ) {
            return SALESMAN_SHOPPING_INCOME;
        }
        else {
            return OTHER;
        }
    }
}
